package hello.jpa.dao;

import hello.jpa.service.UserDao;
import hello.pojos.Users;

/**
 * Author hiberk
 * Date 2017/7/6 13:54
 */
public class UserDaoImpl implements UserDao {
    @Override
    public Users save(Users user) {
       /* EntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory("SimplePU");
        EntityManager entityManager = entityManagerFactory.createEntityManager();
        entityManager.getTransaction().begin();
        entityManager.persist(user);
        entityManager.getTransaction().commit();
        entityManagerFactory.close();*/
        return user;
    }
}
